package com.woniu.stu.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.github.pagehelper.page.PageMethod;
import com.woniu.entity.TStudent;
import com.woniu.mapper.TStudentDao;
import com.woniu.stu.service.Stu2Service;
import com.woniu.stu.vo.TStudentVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author kund
 * @date 2021/9/16 - 21:34
 */
@Service
public class Stu2ServiceImpl implements Stu2Service {
    
    @Resource
    private TStudentDao tStudentDao;
    private PageMethod PageHelper;


    @Override
    public PageInfo<TStudent> findAll(TStudentVo tStudentVo) {
        PageHelper.startPage(tStudentVo.getPageNum(),tStudentVo.getPageSize());
        PageInfo<TStudent> pageInfo = new PageInfo<>(tStudentDao.selectByExample(null));
        return pageInfo;
    }
}
